package com.demo.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.demo.dao.YiShengMapper;
import com.demo.dao.YiShengPaiBanMapper;
import com.demo.entity.YiSheng;
import com.demo.entity.YiShengPaiBan;

@Service
public class DoctorService{
	@Autowired
	private YiShengMapper yiShengMapper;
	
	@Autowired
	private YiShengPaiBanMapper yiShengPaiBanMapper;

	public int deleteByPrimaryKey(Integer id) {
		return yiShengMapper.deleteByPrimaryKey(id);
	}

	public int insert(YiSheng record){
		return yiShengMapper.insert(record);
	}

	public YiSheng selectByPrimaryKey(Integer id){
		return yiShengMapper.selectByPrimaryKey(id);
	}

	public List<YiSheng> selectAll(){
		return yiShengMapper.selectAll();
	}

	public int updateByPrimaryKey(YiSheng record){
		return yiShengMapper.updateByPrimaryKey(record);
	}
    
	public List<YiSheng> selectRandomNews(){
		return yiShengMapper.selectAll();
	}
	
	public List<YiSheng> findyishengBykeshi(String keshi){
		return yiShengMapper.findyishengBykeshi(keshi);
	}
	
	public int deleteByPrimaryKeyp(Integer id) {
		return yiShengPaiBanMapper.deleteByPrimaryKey(id);
	}

	public int insertp(YiShengPaiBan record){
		return yiShengPaiBanMapper.insert(record);
	}

	public YiShengPaiBan selectByPrimaryKeyp(Integer id){
		return yiShengPaiBanMapper.selectByPrimaryKey(id);
	}

	public List<YiShengPaiBan> selectAllp(){
		return yiShengPaiBanMapper.selectAll();
	}

	public int updateByPrimaryKeyp(YiShengPaiBan record){
		return yiShengPaiBanMapper.updateByPrimaryKey(record);
	}
    
	public List<YiShengPaiBan> findYishengByShijian(String jiuzhengshijian){
		return yiShengPaiBanMapper.findYishengByShijian(jiuzhengshijian);
	}
    
	public List<YiShengPaiBan> findYishengByYisheng(String yisheng){
		return yiShengPaiBanMapper.findYishengByYisheng(yisheng);
	}
    
	public  List<YiShengPaiBan> findYishengPaiban(String yisheng, String jiuzhengshijian){
		return yiShengPaiBanMapper.findYishengPaiban(yisheng, jiuzhengshijian);
	}
       
	
}
